{include file="file:$theme_global/_header.tpl"}	

<div id="breadcrumb">
	<a href="/">home</a> &gt; <a href="/users">members</a>
</div>

<div id="sidebar">
	<h3>Search People</h3>
	<div class="section">
		<form action="/community" method="post" id="search-user-form">
			<fieldset>
				<div class="field">
					<label>Keywords</label>
					<div class="input">
						<input name="searchterm" type="text" value="{$params.searchterm|replace:"-":" "}" class="text" />
					</div>
				</div>
			</fieldset>
			<fieldset>
				<div class="field">
					<label>Guys/Girls</label>
					<div class="input">
						{html_options name=gender options=$genders selected=$params.gender}
					</div>
				</div>
				<div class="field">
					<div class="label">Age</div>
					<div class="input">
						<label class="hide">Minimum Age</label>
						{html_options name=min_age options=$ages selected=$params.min_age}
						<span>to</span>
						<label class="hide">Maximum Age</label>
						{html_options name=max_age options=$ages selected=$params.max_age}
					</div>
				</div>
				<div class="field">
					<label>Sign</label>
					<div class="input">
						{html_options name=sign options=$signs selected=$params.sign}
					</div>
				</div>
			</fieldset>
			<fieldset>
				<div class="field full">
					<label>Country</label>
					<div class="input">
						{html_options name=country options=$countries selected=$params.country}
					</div>
				</div>
				<div class="field full">
					<label>Region</label>
					<div class="input">
						{html_options name=region options=$regions selected=$params.region}
					</div>
				</div>
			</fieldset>
			<fieldset>
				<div class="field">
					<div class="label">Sort by</div>
					<div class="input">
						<ul>
							<li><label><input type="radio" name="sortby" value="updated" {if $params.sortby eq "updated"}checked="checked"{/if} /> recently updated</label></li>
							<li><label><input type="radio" name="sortby" value="login" {if $params.sortby eq "login"}checked="checked"{/if} /> last login</label></li>
							<li><label><input type="radio" name="sortby" value="newest" {if $params.sortby eq "newest"}checked="checked"{/if} /> newest</label></li>
						</ul>
					</div>
				</div>
			</fieldset>
			<div class="submit">
				<button type="submit" class="update">Update</button>
			</div>
		</form>
	</div>
</div>
<div id="content">
	<h2>Browse People</h2>
{if count($users) gt 0}
	<ul class="members_list" id="sort_members">
	{foreach from=$users item=user key=index}
		
		<li{if ($index + 1) mod 6 eq 0} class="alt"{/if}>
			<a href="/profile/{$user.username}" title="{$user.full_name} :: {if $user.gender ne "unspecified"}{$user.gender|capitalize} /{/if} {$user.age} years old / {$user.sign|capitalize} {if isset($user.location)}/ {$user.location|escape}{/if}" class="tips"><span class="image"><img src="/displayimage/{$user.username}/original/70/70/1/jpg/avatar" alt="" /></span>
			<!--<span class="username">{$user.username}</span>--></a>
		</li>
	{/foreach}
	</ul>
	{include file="file:$theme_global/_pager.tpl"}
{else}
	<p>No users found.</p>		
{/if}
</div>
{include file="file:$theme_global/_footer.tpl"}	